package com.qls.ali.model.dto.request;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.nacos.api.utils.StringUtils;

import java.io.Serializable;

/**
 * @author doyoung
 */
public class PushRoom implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 商家酒店ID，指明该房型属于哪家酒店
     */
    @JSONField(name = "out_hid")
    private String hotelCode;
    /**
     * 卖家房型ID
     */
    @JSONField(name = "outer_id")
    private String roomCode;

    /**
     * 房型名称
     */
    @JSONField(name = "name")
    private String roomName;

    /**
     * 床型
     */
    @JSONField(name = "bed_type")
    private String bedType;

    public String getHotelCode() {
        return hotelCode;
    }

    public void setHotelCode(String hotelCode) {
        this.hotelCode = hotelCode;
    }

    public String getRoomCode() {
        return roomCode;
    }

    public void setRoomCode(String roomCode) {
        this.roomCode = roomCode;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        if (StringUtils.isBlank(roomName)) {
            roomName = "大床房";
        }
        if (roomName.length() > 30) {
            roomName = roomName.substring(0, 30);
        }
        this.roomName = roomName;
    }

    public String getBedType() {
        return bedType;
    }

    public void setBedType(String badType) {
        if (StringUtils.isBlank(badType)) {
            badType = "大床";
        }
        if (badType.length() > 100) {
            badType = badType.substring(0, 100);
        }
        this.bedType = badType;
    }

    @Override
    public String toString() {
        return "PushRoom{" +
                "hotelCode='" + hotelCode + '\'' +
                ", roomCode='" + roomCode + '\'' +
                ", roomName='" + roomName + '\'' +
                ", badType='" + bedType + '\'' +
                '}';
    }
}
